package com.sun.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sun.dto.InstoreDto;
import com.sun.entity.Instore;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @Project: hospitalDrugInformationManagement
 * @Author: 86178
 * @Date: 2023/3/21 15:19
 * @FileName: InstoreService
 * @Description: ""
 */
public interface InstoreService extends IService<Instore> {
    IPage<InstoreDto> selectInstoreDtoListPage(@Param("page") IPage<InstoreDto> page, @Param("userName") String userName, @Param("status") Integer status, @Param("type") Integer type, String addr, LocalDateTime startTime, LocalDateTime endTime);

    @Transactional
    void saveWithInstoreDetail(InstoreDto instoreDto);

    @Transactional
    void updateWithInstoreDetail(InstoreDto instoreDto);


    InstoreDto getByIdWithInstoreDetail(Long id);

    @Transactional
    void batchDeleteByIds(List<Long> ids);

    @Transactional
    void updateStatusByIds(List<Long> ids);
}
